package com.xiyuan.smartutils.template.engine.expression.symbol;

import com.xiyuan.smartutils.template.engine.VariableMap;
import com.xiyuan.smartutils.template.engine.exception.ExpressionException;
import com.xiyuan.smartutils.template.engine.expression.Expression;

/**
 * 标点符号表达式
 * 
 * @version v1.0.0 @author lgz 2020年10月31日 新建与整理
 */
public abstract class Symbol extends Expression
{
    private static final long serialVersionUID = 1L;
    //符号，从变量中转化
    public static final int SYMBOL_GT                          = 11;
    public static final int SYMBOL_GTE                         = 12;
    public static final int SYMBOL_LT                          = 13;
    public static final int SYMBOL_LTE                         = 14;
    
    //符号，单标点13个
    public static final int SYMBOL_UNKNOWN                     = -1;//未知
   
    /**; 59 */
    public static final int SYMBOL_SEMICOLON                   = _SEMICOLON_;// ;    
    /**( 40 */
    public static final int SYMBOL_PARENTHESIS_LEFT           = _PARENTHESIS_LEFT;// 40 (
    /** ) 41*/
    public static final int SYMBOL_PARENTHESIS_RIGHT          = _PARENTHESIS_RIGHT;// 41 )
    /** [91**/
    public static final int SYMBOL_BRACKET_LEFT                = _BRACKET_LEFT;//
    /**] 93*/
    public static final int SYMBOL_BRACKET_RIGHT               = _BRACKET_RIGHT;//] 93
    /***,44*/
    public static final int SYMBOL_COMMA                      = _COMMA_;//,44
    /**.46*/
    public static final int SYMBOL_DOT                        = _DOT_;//.46
    /**=61*/
    public static final int SYMBOL_EQUAL                      = _EQUAL_;//=61
    /**!33*/
    public static final int SYMBOL_EXCLAMATION                = _EXCLAMATION_;//!33
    /**+43*/
    public static final int SYMBOL_PLUS                       = _PLUS_;//+43
    /**-45**/
    public static final int SYMBOL_MINUS                      = _MINUS_;//-45
    /** *42*/
    public static final int SYMBOL_ASTERISK                   = _ASTERISK_;//*42
    /** /47*/
    public static final int SYMBOL_SLASH                      = _SLASH_;//
    /**%37*/
    public static final int SYMBOL_PERCENT                    = _PERCENT_;//%37
    /**?63*/
    public static final int SYMBOL_QUESTION                   = _QUESTION_;//?63
    /**:58*/
    public static final int SYMBOL_COLON                      = _COLON_;//:58
    
    //符号，双标点2个
    /**&38*/
    public static final int SYMBOL_AMPERSAND                  = _AMPERSAND_;//&38
    /**&&3838**/
    public static final int SYMBOL_AMPERSAND_2                  = 3838;//&38
    /**|124*/
    public static final int SYMBOL_VERTICAL                   = _VERTICAL_BAR_;//||124
    /**||124124*/
    public static final int SYMBOL_VERTICAL_2                 = 124124;//||124
    
    //符号，双标点扩展
    /**!= 3631*/
    public static final int SYMBOL_NOTQUAL                     = 3361;//!=
    /**.. 4646*/
    public static final int SYMBOL_DOT_2                      = 4646;//..
    public static final int SYMBOL_EQUAL_2                     = 61610;//恒等
    
    /**new，实例化newInstance*/
    public static final int SYMBOL_NEW                         = 110101119;//new，实例化newInstance
    public Symbol(String path, int line, int column)
    {
        super(path, line, column);
    }
    
    protected final Object build(VariableMap page) throws ExpressionException
    {
        throw new ExpressionException(this, "禁止调用表达式 {" + this + "}");
    }
}
